<?php
	include(ROOTPATH .'include'. DS .'protect.php');
	include(ROOTPATH .'include'. DS .'initUser.php');
	include "header.php"; 
	
	$indexCommends = $dbs -> select('SELECT * FROM `'. DB_PRE.'index_commend` ORDER BY `id` DESC limit 0,1');

?>
<?php /*?><script type="text/javascript" src="<?php echo JSLAB_PATH;?>beautyStyle/js/beautyStyle.js"></script>
<link href="<?php echo JSLAB_PATH;?>beautyStyle/images/beautyStyle.css" type="text/css" rel="stylesheet" media="all" /><?php */?>
<script type="text/javascript" src="<?php echo JS_PATH;?>index.js"></script>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-19229445-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body id="index">

<?php require('top.php');?>
<div class="pos">
	<div class="contents">
    	<?php require('nav.php'); ?> 
        <h2 class="title"><?php echo lang_index;?></h2>
        <div id="recommendMedia" class="mediaShow"><input type="hidden" id="indexShowId" value="<?php echo $indexCommends['link']; ?>" />
        	<div id="showImages">
                <div class="photoShow">
					<?php
                        $commendCount = count($indexCommends);
                        foreach($indexCommends as $commend){				
                    ?>
                    	<?php /*?><li><a href="<?php echo $commend['link'];?>" target="_blank"><img src="<?php echo $commend['thumb']; ?>" width="800" height="260" /></a></li><?php */?>

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="900" height="300" id="dplayer" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="movie" value="<?php echo $commend['thumb']; ?>" />
<param name="quality" value="high" />
<embed src="<?php echo $commend['thumb']; ?>" quality="high" width="900" height="300" name="dplayer" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object><?php
                        }
               ?></div><!-- .photoShow-->
            </div><!-- #showImages-->
           
            <div id="topLists" class="tabs">
            	<h2 class="title"><a href="#"><?php echo lang_top_hits;?></a><a href="#"><?php echo lang_lastly_update;?></a><a href="#"><?php echo lang_top_assess;?></a></h2>
                	<?php $mediasTop = new mediasTop ;?>
                    <?php echo $mediasTop -> getList('hits',20,'grid');?>
                    <?php echo $mediasTop -> getList('id',20,'grid');?>
                    <?php echo $mediasTop -> getList('star',20,'grid');?>
            </div><!-- #topLists-->
            
<?php /*?>            <div id="taskTopLists" class="taskTopLists topLists tabs">
            	<h2 class="title"><a href="#" class="action"><?php echo lang_lastly_task;?></a></h2>
                	<?php $task = new task();?>
                    <ul><?php echo $task -> getLists(4);?></ul>
            </div><!-- #topLists--><?php */?>
            
           <?php /*?> <div id="tags" class="tags tabs">
            	<h2 class="title"><a href="#" class="action"><?php echo lang_tags;?></a></h2>
                	<?php $tag = new tag();?>
                    <ul><?php echo $tag -> getList(25);?></ul>
            </div><!-- #topLists--> <?php */?>
        
        </div><!-- #recommendMedia-->
    </div><!-- .contents -->
</div>

<?php require('footer.php'); ?>

</body>
</html>